<?php
namespace Weibo\Controller;
use Weibo\Controller\WeibobaseController;

/**
 * 举报控制器
 * @author Hongwei	2016-12-26
 */
class ReportController extends WeibobaseController {

	/**
	 *  举报操作
	 */
	//意见反馈
	public function feedback()
	{
		$description = $_POST['description'];
		$user_id = $_POST['user_id'];
		$report_type = $_POST['report_type'];
		$report_cate = $_POST['report_cate'];
		$feed_model = M("weibo_report");
		$data['description'] = $description;
		$data['user_id'] = $user_id;
		$data['type']  = $report_type;
		$data['cate_id'] = $report_cate;
		$data['report_time'] = time();
		$feed_id = $feed_model->add($data);
		if ($feed_id) {
			$ret = array('msg' => 1);
			echo json_encode($ret);
			exit;
		} else {
			$ret = array('msg' => 0);
			echo json_encode($ret);
			exit;
		}
	}


}